LiveUser_Admin
[ class tree: LiveUser_Admin ] [ index: LiveUser_Admin ] [ all elements ]

Source for file Subgroups.php

Documentation is available at Subgroups.php

  1. <?php require_once 'index.php'?>
  2. <h3>Subgroups</h3>
  3. <?php
  4. $groups $admin->perm->getGroups();
  5. if  (empty($groups)) {
  6.     echo 'Run the <b>Group</b> test first<br />';
  7.     exit;
  8. }
  9.  
  10. for ($i = 0; $i < 5; $i++{
  11.     $group array_rand($groups);
  12.     $subgroup array_rand($groups);
  13.     $assign $admin->perm->assignSubgroup($group$subgroup);
  14.     if ($assign === false{
  15.         echo $subgroup.' is already a subgroup of <b>'.$group.'</b><br />';
  16.     else {
  17.         echo $subgroup.' is now subgroup of <b>'.$group.'</b><br />';
  18.     }
  19. }
  20.  
  21. # unassignSugroup
  22. # getParentGroup
  23.  
  24. // Get
  25. echo 'All the groups:<br />';
  26. $allGroups $admin->perm->getGroups(nulltrue);
  27. if ($allGroups === false{
  28.     echo $allGroups->getMessage().'<br />';
  29. else {
  30.     Var_Dump::display($allGroups);
  31.     echo '<br />';
  32. }
  33. echo '<hr />';

Documentation generated on Mon, 11 Mar 2019 14:00:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.